<!doctype html>
<html lang="en">
  <title>WebSocket client</title>
  <meta charset="utf-8">
  <script src="websocket.js"></script>
  <script src="signal.js"></script>
  <link rel="stylesheet" href="signal.css">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <body>
  <div id="top">
    <div id="tool">
    <h1>WebSocket client</h1>
    <div>
      <h2>Establish WebSocket connection</h2>
      <div class="input-line">
      <label for="url">URL:</label>
      <input type="text" name="url" id="url"
             value="wss://local.wxip.top:9991">
      <input type="button" id="connect" value="Connect" onclick="connect()">
      </div>
    </div>
    <div>
      <h2>Send data over WebSocket</h2>
      <form name="sending">
      <textarea name="data" id="data">这是测试数据</textarea>
      <input type="button" id="send" name="send" value="Send data"
             disabled onclick="sendData()">
      </form>
    </div>
    <div>
      <h2>Event log</h2>
      <ul id="event-log">
      </ul>
    </div>
    </div>
  </div>
  </body>
</html>
